#ifndef __DAEMON_SUB_PROCESS_H__
#define __DAEMON_SUB_PROCESS_H__

#include <sys/types.h>

/*子进程结构体*/
typedef struct 
{
    pid_t pid;
    char* cmd;
    int failed_count;
}sub_process_t;

/*初始化子进程*/
sub_process_t* daemon_sub_process_Init(char* cmd);

/*检查并启动子进程*/
int daemon_sub_process_check_start(sub_process_t* process);

/*杀死子进程*/
void daemon_sub_process_destroy(sub_process_t* process);


#endif /* __DAEMON_SUB_PROCESS_H__ */